<?php
class Config {

    public static $database;

    public static $rootUrl;

    public static $rootPath;

    public static $appPath;

    public static $environment;

    public static function url($path, $full = false) {
        $prefix = ($full == true) ? self::$rootUrl : self::$appPath;
        return sprintf("%s%s", $prefix, trim($path, '/'));
    }

    public static function asset($type = null, $path = null, $full = false) {
        $prefix = ($full == true) ? self::$rootUrl : self::$appPath;
        $fullPath = sprintf("%sassets/%s/%s", $prefix, $type, $path);
        return $fullPath;
    }

    public static function getDatabase() {
        return self::$database[self::$environment];
    }

}
?>